import 'package:json_annotation/json_annotation.dart';

part 'Result.g.dart';

///ResultObject
@JsonSerializable()
class Result {

  ///编码：1成功，0和其它数字为失败
  @JsonKey(name: "code")
  int? code;

  ///数据
  @JsonKey(name: "data")
  dynamic data;

  ///错误信息
  @JsonKey(name: "msg")
  String? msg;

  Result({
    this.code,
    this.data,
    this.msg,
  });

  factory Result.fromJson(Map<String, dynamic> json) => _$ResultFromJson(json);

  Map<String, dynamic> toJson() => _$ResultToJson(this);
}
